package com.amsp.oa.oademo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 申购单主表实体类
 */
@Data
@TableName("purchase_request")
@ApiModel(value = "申购单主表", description = "申购单主表信息")
public class PurchaseRequest {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "申购单编号")
    private String requestNo;

    @ApiModelProperty(value = "申购部门")
    private String department;

    @ApiModelProperty("申请日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate requestDate;

    @ApiModelProperty(value = "核准人")
    private String approver;

    @ApiModelProperty(value = "审批人")
    private String reviewer;

    @ApiModelProperty(value = "确认人")
    private String confirmator;

    @ApiModelProperty(value = "制单人")
    private String formMaker;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否删除(0-未删除，1-已删除)")
    @TableLogic
    private Integer isDeleted;
}